Change the Call to the JavaScript Function in the Trigger Events
We commonly use the term "trigger" to refer to an image or imagemap
that you generated from a slice, button, or hotspot to which you attached the
original Pop-up Menu behavior. "Event" is another term that is commonly
used in HTML and JavaScript. An event is simply an action that initiates a JavaScript
or other HTML behavior. The event we will work with is the onMouseOver event
for the Pop-up Menu triggers.
Let's get started!
Use the following steps to change the trigger:
- Open the HTML file that contains the Pop-up Menu triggers.
Locate the
onMouseOverevent that calls theMM_showMenufunction. The onMouseOver can be called from an<a href>or a<map>tag. Your code will appear similar to the following:For
<a href>:<td> <a href="#" onMouseOut="MM_swapImgRestore();MM_startTimeout():" onMouseOver="MM_showMenu (window.mm_menu_1112151431_0,144,0,null, 'transparent_popups_r1_c1'); ...
For
<map>:<img name="n00000001" src="00000001.gif" width="975" height="91" border="0" usemap="#m_00000001" alt=""><map name="m_00000001"><area shape="rect" coords="121,19,326,63" href="#" alt="" onMouseOut="MMstartTimeout(); onMouseOver="MM_showMenu (window.mm_menu_0030152709_0,327,13,null,'n0000000');">
Replace
MM_showMenu
for each of the
onMouseOverevents with:flevShowFramedFWPopup
-
The menu parameters are the code that follow the call to the function within the parentheses. If you are working with Fireworks 4 code, remove:
parent.content
Which you added when you followed the steps in TechNote 15816 (for Fireworks 4). If you are working with Fireworks MX code and you followed the instructions in the TechNote How to make Pop-up Menus from Fireworks MX appear in a different frame (TechNote 16648), remove:
parent.content
which you added when you performed the steps in TechNote 16648.
-
Since you are no longer making a direct call to the
MM_showMenufunction, you'll reference the menu name, which is the first item in the parenthesis after theflevShowFramedFWPopup, which you added in step 3, above. To do this, put the menu name in single quotes:flevShowFramedFWPopup('mm_menu_1024174806_0'...Note: Although it looks as if I've forgotten a closing parentheses in the code snippet above, there are other parameters that follow the the first parameter in the parentheses, as noted by the ellipses.
-
Insert a new second parameter—the name of the frame in which you have set the menus to appear just after the menu name:
<a href="#" onMouseOut="MM_startTimeout();" onMouseOver="flevShowFramedFWPopup('mm_menu_1024174806_0','content', -47,30,null,'align_me_r2_c2');">Note: Make sure you put the frame name in single quotes.
- Save the HTML containing the triggers and keep it open.
Next you'll insert the function that Marja wrote to enable the scrolling menus.